Check disk usage in Linux. df and du are the most common ones, but sometimes the results of DU and DF are different. Sometimes there is a big gap.
1. Explanation of the two Commands
Du -- disk usage
DF -- Disk Free
2. How du and DF work
2.1 du
PS: Some time ago, children's shoes asked me, why his server with DF and du command query file size display is different. In fact, these two command query principle is not the same, the following is a brief analysis:1, under normal circumstances, DF
In Linux, when the middleware log file is deleted, df shows that the disk space is still not released. when the disk size exceeds the standard, an alarm is triggered. in this case, it is wise to master the df and du commands. Df allows you to view
In Linux, the df and du commands for viewing files and folders will trigger an alarm when the disk size exceeds the standard. In this case, it is wise to master the df and du commands. Df allows you to view the size, usage ratio, file system, and
1. Preface
In embedded devices, hard disk space is very limited, when it comes to the process of often write log, you need to consider the size of the log and delete, or soon the hard disk is full, causing the log program crashes. In order to
In Linux, when the middleware log file is deleted, df shows that the disk space is still not released. When the disk size exceeds the standard, an alarm is triggered. In this case, it is wise to master the df and du commands. Df allows you to view
Vi. Linux/UNIX operating command accumulation [kill, netstat, df, du], netstatduIn Linux/UNIX, users often use the text interface to set the system or operating system. The author is constantly in touch with this command during his work, therefore,
Document directory
Du command:
DF command:
Unallocated space in the file system is used to determine the size of allocated space in the file system. For example, if a file system contains 8192 512-byte blocks and 4096 are not allocated, the
Du, df, and Linuxdudf in Linux
During Linux O & M, it is often found that the values of du and df are different, and sometimes they are very different.
In specific circumstances, df may see that the disk is full, but du determines that the disk
DFCommand:Check disk space usage of the file system
Commonly used: DF-hi, DF,-ha, DF-th, DF-th-x vfat,
Function: You can use this command to obtain the space occupied by the hard disk and the remaining space.
Syntax: DF [Option]
-A: displays the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.